package com.ficus.road.maintain.core.infrastructure.mongo.converter;

import org.springframework.core.convert.converter.Converter;
import org.springframework.data.convert.WritingConverter;

@WritingConverter
public class BooleanConverter implements Converter<Integer, Boolean> {
    @Override
    public Boolean convert(Integer source)
    {
        return (source != 0 ? true : false);
    }
}
